package com.ybkj.daijia.server.dockingsupervise.zhuanche;

import java.io.Serializable;
import java.util.Date;
import org.apache.commons.lang3.time.DateFormatUtils;

/**
 * 驾驶员处罚信息
 *
 * @author Administrator
 */
public class CfxxMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    private String type = Type.MOREQ_CFXX;//类功能

    private Long id;//编号

    private String vehicleLicense;//机动车驾驶证编号

    private String driverName;//驾驶员名字

    private String driverIdCode;//驾驶员身份证号码

    private String punishTime;//处罚时间

    private String punishReason;//处罚原因

    private String punishResult;//处罚结果

    private String appKey;//appKey


    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getVehicleLicense() {
        return vehicleLicense;
    }

    public void setVehicleLicense(String vehicleLicense) {
        this.vehicleLicense = vehicleLicense == null ? null : vehicleLicense.trim();
    }

    public String getDriverName() {
        return driverName;
    }

    public void setDriverName(String driverName) {
        this.driverName = driverName == null ? null : driverName.trim();
    }

    public String getDriverIdCode() {
        return driverIdCode;
    }

    public void setDriverIdCode(String driverIdCode) {
        this.driverIdCode = driverIdCode == null ? null : driverIdCode.trim();
    }

    public String getPunishTime() {
        return punishTime;
    }

    public void setPunishTime(String punishTime) {
        this.punishTime =
            punishTime == null ? (DateFormatUtils.format(new Date(), "yyyy-MM-dd hh:mm:ss"))
                : punishTime.trim();
    }

    public String getPunishReason() {
        return punishReason;
    }

    public void setPunishReason(String punishReason) {
        this.punishReason = punishReason == null ? null : punishReason.trim();
    }

    public String getPunishResult() {
        return punishResult;
    }

    public void setPunishResult(String punishResult) {
        this.punishResult = punishResult == null ? null : punishResult.trim();
    }

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey == null ? null : appKey.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CfxxMessage other = (CfxxMessage) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getVehicleLicense() == null ? other.getVehicleLicense() == null
            : this.getVehicleLicense().equals(other.getVehicleLicense()))
            && (this.getDriverName() == null ? other.getDriverName() == null
            : this.getDriverName().equals(other.getDriverName()))
            && (this.getDriverIdCode() == null ? other.getDriverIdCode() == null
            : this.getDriverIdCode().equals(other.getDriverIdCode()))
            && (this.getPunishTime() == null ? other.getPunishTime() == null
            : this.getPunishTime().equals(other.getPunishTime()))
            && (this.getPunishReason() == null ? other.getPunishReason() == null
            : this.getPunishReason().equals(other.getPunishReason()))
            && (this.getPunishResult() == null ? other.getPunishResult() == null
            : this.getPunishResult().equals(other.getPunishResult()))
            && (this.getAppKey() == null ? other.getAppKey() == null
            : this.getAppKey().equals(other.getAppKey()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result =
            prime * result + ((getVehicleLicense() == null) ? 0 : getVehicleLicense().hashCode());
        result = prime * result + ((getDriverName() == null) ? 0 : getDriverName().hashCode());
        result = prime * result + ((getDriverIdCode() == null) ? 0 : getDriverIdCode().hashCode());
        result = prime * result + ((getPunishTime() == null) ? 0 : getPunishTime().hashCode());
        result = prime * result + ((getPunishReason() == null) ? 0 : getPunishReason().hashCode());
        result = prime * result + ((getPunishResult() == null) ? 0 : getPunishResult().hashCode());
        result = prime * result + ((getAppKey() == null) ? 0 : getAppKey().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", vehicleLicense=").append(vehicleLicense);
        sb.append(", driverName=").append(driverName);
        sb.append(", driverIdCode=").append(driverIdCode);
        sb.append(", punishTime=").append(punishTime);
        sb.append(", punishReason=").append(punishReason);
        sb.append(", punishResult=").append(punishResult);
        sb.append(", appKey=").append(appKey);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
